package com.superzlc.miniweb.servlet;

import java.util.HashMap;

import javax.servlet.http.HttpServletRequest;

public class Model extends HashMap<String, Object> {
	private static final long serialVersionUID = 1L;

	public Object getAttribute(String k) {
		return this.get(k);
	}

	public void setAttribute(String k, Object v) {
		this.put(k, v);
	}

	public void addAttribute(String k, Object v) {
		this.put(k, v);
	}

	public void addAttribute2Request(HttpServletRequest request) {
		for (String k : this.keySet()) {
			request.setAttribute(k, this.get(k));
		}
	}
}
